package excelTools

import (
	"github.com/xuri/excelize/v2"
)

func ReaderExcel(path string) (rows [][]string, err error) {
	f, err := excelize.OpenFile(path)
	if err != nil {
		return
	}
	defer func() {
		// 关闭工作簿
		if err := f.Close(); err != nil {
			return
		}
	}()
	// 获取 Sheet1 上所有单元格
	rows, err = f.GetRows("Sheet1")
	return
}
